Extension { #name : 'RGMethodDefinitionTest' }

{ #category : '*Ring-Definitions-Monticello-Tests' }
RGMethodDefinitionTest >> testAsFullMethodDefinition [
	| rgMethod |
	rgMethod := (Class >> #asRingDefinition) asRingDefinition.
	self assert: rgMethod parent isNil.
	self assert: rgMethod package isNil.

	"retrieves package information from protocol name (class extension)"
	rgMethod := Class asFullRingDefinition methodNamed: #asRingDefinition.
	self assert: rgMethod parent isNotNil.
	self assert: rgMethod parentName equals: #Class.
	self assert: rgMethod parent methods size equals: Class methods size.
	self assert: rgMethod parent package name equals: #'Kernel-CodeModel'.
	self assert: rgMethod package isNotNil.
	self assert: rgMethod package name equals: #'Ring-Definitions-Core'.

	"retrieves package information from class package name "
	rgMethod := Class asFullRingDefinition methodNamed: #name.
	self assert: rgMethod parent isNotNil.
	self assert: rgMethod parentName equals: #Class.
	self assert: rgMethod parent methods size equals: Class methods size.
	self assert: rgMethod parent package name equals: #'Kernel-CodeModel'.
	self assert: rgMethod package isNotNil.
	self assert: rgMethod package name equals: #'Kernel-CodeModel'
]
